
#include <stdio.h>
#include <stdlib.h>
#include<windows.h >
	int main()
	{
		int x = 1, y = 1, j, i;
		int vx = 1, vy = 1;
		int top = 0;
		int bottom = 10;
		int left = 0;
		int right = 15;
		while(1)
		{
			if (x == top||x==bottom) {
				vx = -1 * vx;
			}
			if (y == left || y == right) {
				vy = -1 * vy;
			}
			system("cls");
			x = x + vx;
			y = y + vy;
			for (j = 0; j < x; j++) {
				printf("\n");
			}
			for (i = 0; i < y; i++) {
				printf(" ");
			}
		printf("0\n"); 
		Sleep(50);
		}
		return 0;
	}